<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
			<!-- template designed by Marco Von Ballmoos  -->
			<title>Docs For Class ThinkTemplate</title>
			<link rel="stylesheet" href="../../media/stylesheet.css" />
						<script src="../../media/lib/classTree.js"></script>
												<script language="javascript" type="text/javascript">
				var imgPlus = new Image();
				var imgMinus = new Image();
				imgPlus.src = "../../media/images/plus.png";
				imgMinus.src = "../../media/images/minus.png";
				
				function showNode(Node){
							switch(navigator.family){
								case 'nn4':
									// Nav 4.x code fork...
							var oTable = document.layers["span" + Node];
							var oImg = document.layers["img" + Node];
									break;
								case 'ie4':
									// IE 4/5 code fork...
							var oTable = document.all["span" + Node];
							var oImg = document.all["img" + Node];
									break;
								case 'gecko':
									// Standards Compliant code fork...
							var oTable = document.getElementById("span" + Node);
							var oImg = document.getElementById("img" + Node);
									break;
							}
					oImg.src = imgMinus.src;
					oTable.style.display = "block";
				}
				
				function hideNode(Node){
							switch(navigator.family){
								case 'nn4':
									// Nav 4.x code fork...
							var oTable = document.layers["span" + Node];
							var oImg = document.layers["img" + Node];
									break;
								case 'ie4':
									// IE 4/5 code fork...
							var oTable = document.all["span" + Node];
							var oImg = document.all["img" + Node];
									break;
								case 'gecko':
									// Standards Compliant code fork...
							var oTable = document.getElementById("span" + Node);
							var oImg = document.getElementById("img" + Node);
									break;
							}
					oImg.src = imgPlus.src;
					oTable.style.display = "none";
				}
				
				function nodeIsVisible(Node){
							switch(navigator.family){
								case 'nn4':
									// Nav 4.x code fork...
							var oTable = document.layers["span" + Node];
									break;
								case 'ie4':
									// IE 4/5 code fork...
							var oTable = document.all["span" + Node];
									break;
								case 'gecko':
									// Standards Compliant code fork...
							var oTable = document.getElementById("span" + Node);
									break;
							}
					return (oTable && oTable.style.display == "block");
				}
				
				function toggleNodeVisibility(Node){
					if (nodeIsVisible(Node)){
						hideNode(Node);
					}else{
						showNode(Node);
					}
				}
			</script>
					</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class ThinkTemplate</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
													<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
						|											<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">ThinkPHP内置模板引擎类</p>
<p class="description"><p>支持XML标签和普通标签的模板解析  编译型模板引擎 支持动态缓存</p></p>
	<ul class="tags">
				<li><span class="field">author:</span> liu21st &lt;<a href="mailto:liu21st@gmail.com">liu21st@gmail.com</a>&gt;</li>
				<li><span class="field">version:</span> $Id$</li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_Think---Template---ThinkTemplate.class.php.html">/Think/Template/ThinkTemplate.class.php</a> (line <span class="field">27</span>)
		</p>
		
				
		<pre><a href="../../Think/Core/Base.html">Base</a>
   |
   --ThinkTemplate</pre>
	
			</div>
</div>



	<a name="sec-var-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Variable Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
						<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
							| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
								</div>
		<div class="info-box-body">
			<div class="var-summary">
																																								<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$tagLib" title="details" class="var-name">$tagLib</a>
				</div>
																<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$templateFile" title="details" class="var-name">$templateFile</a>
				</div>
																<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$tVar" title="details" class="var-name">$tVar</a>
				</div>
											</div>
		</div>
	</div>

	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																		<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
				 
				|
						<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																																		
				<div class="method-definition">
					static 						<span class="method-result"><a href="../../Think/Core/App.html">App</a></span>
										<a href="#getInstance" title="details" class="method-name">getInstance</a>
										()
									</div>
																																																																																																																										
				<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#buildAllTemplate" title="details" class="method-name">buildAllTemplate</a>
											([<span class="var-type"></span>&nbsp;<span class="var-name">$tmplPath</span> = <span class="var-default">TMPL_PATH</span>], <span class="var-type">mixed</span>&nbsp;<span class="var-name">$tmplContent</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$charset</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">boolen</span>
										<a href="#checkCache" title="details" class="method-name">checkCache</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$tmplTemplateFile</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#cleanCache" title="details" class="method-name">cleanCache</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$filename</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#cleanDir" title="details" class="method-name">cleanDir</a>
											([<span class="var-type">string</span>&nbsp;<span class="var-name">$cacheDir</span> = <span class="var-default">CACHE_PATH</span>])
									</div>
														
				<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#compiler" title="details" class="method-name">compiler</a>
											(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$tmplContent</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$charset</span> = <span class="var-default">''</span>])
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#get" title="details" class="method-name">get</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$name</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">string|false</span>
										<a href="#getIncludeTagLib" title="details" class="method-name">getIncludeTagLib</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">&$content</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$content</span>)
									</div>
																						
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#load" title="details" class="method-name">load</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$templateFile</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$charset</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$templateVar</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$varPrefix</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#loadTemplate" title="details" class="method-name">loadTemplate</a>
											([<span class="var-type">string</span>&nbsp;<span class="var-name">$tmplTemplateFile</span> = <span class="var-default">''</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$charset</span> = <span class="var-default">''</span>], <span class="var-type">string</span>&nbsp;<span class="var-name">$varPrefix</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#parse" title="details" class="method-name">parse</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$content</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#parseInclude" title="details" class="method-name">parseInclude</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$tmplPublicName</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">string|false</span>
										<a href="#parseLiteral" title="details" class="method-name">parseLiteral</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$content</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#parseTag" title="details" class="method-name">parseTag</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$tagStr</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#parseTagLib" title="details" class="method-name">parseTagLib</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$tagLib</span>, <span class="var-type"></span>&nbsp;<span class="var-name">&$content</span>, [<span class="var-type">boolen</span>&nbsp;<span class="var-name">$hide</span> = <span class="var-default">false</span>], <span class="var-type">string</span>&nbsp;<span class="var-name">$content</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#parseThinkVar" title="details" class="method-name">parseThinkVar</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$varStr</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#parseVar" title="details" class="method-name">parseVar</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$varStr</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#parseVarFunction" title="details" class="method-name">parseVarFunction</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$varArray</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">string|false</span>
										<a href="#parseXmlTag" title="details" class="method-name">parseXmlTag</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$tagLib</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$tag</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$attr</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$content</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">string|false</span>
										<a href="#restoreLiteral" title="details" class="method-name">restoreLiteral</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$tag</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#set" title="details" class="method-name">set</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$name</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$value</span>)
									</div>
											</div>
		</div>
	</div>		

	<a name="sec-vars"></a>
	<div class="info-box">
		<div class="info-box-title">Variables</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
										<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
						
			
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			
<a name="var$tagLib" id="$tagLib"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$tagLib</span>
			 = <span class="var-default">array()</span>			(line <span class="line-number">31</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$templateFile" id="$templateFile"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$templateFile</span>
			 = <span class="var-default">  ''</span>			(line <span class="line-number">33</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$tVar" id="$tVar"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$tVar</span>
			 = <span class="var-default">array()</span>			(line <span class="line-number">35</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	
		
		

</div>
						
		</div>
	</div>
	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
																	<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="methodgetInstance" id="getInstance"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">static getInstance</span> (line <span class="line-number">47</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">取得模板实例对象</p>
<p class="description"><p>静态方法</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		static <span class="method-result"><a href="../../Think/Core/App.html">App</a></span>
		<span class="method-name">
			getInstance
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodbuildAllTemplate" id="buildAllTemplate"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">buildAllTemplate</span> (line <span class="line-number">133</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">重新编译项目全部模版</p>
	<ul class="tags">
				<li><span class="field">throws:</span> ThinkExecption</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			buildAllTemplate
		</span>
					([<span class="var-type"></span>&nbsp;<span class="var-name">$tmplPath</span> = <span class="var-default">TMPL_PATH</span>], <span class="var-type">mixed</span>&nbsp;<span class="var-name">$tmplContent</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$charset</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$tmplContent</span><span class="var-description">: 模板内容</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$charset</span><span class="var-description">: 模板输出字符集</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$tmplPath</span>			</li>
				</ul>
		
			
	</div>
<a name="methodcheckCache" id="checkCache"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">checkCache</span> (line <span class="line-number">222</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">检查缓存文件是否有效</p>
<p class="description"><p>如果无效则需要重新更新</p></p>
	<ul class="tags">
				<li><span class="field">throws:</span> ThinkExecption</li>
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">boolen</span>
		<span class="method-name">
			checkCache
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$tmplTemplateFile</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$tmplTemplateFile</span><span class="var-description">: 模板文件名</span>			</li>
				</ul>
		
			
	</div>
<a name="methodcleanCache" id="cleanCache"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">cleanCache</span> (line <span class="line-number">254</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">清除缓存或者静态文件</p>
	<ul class="tags">
				<li><span class="field">throws:</span> ThinkExecption</li>
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			cleanCache
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$filename</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$filename</span><span class="var-description">: 缓存文件名</span>			</li>
				</ul>
		
			
	</div>
<a name="methodcleanDir" id="cleanDir"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">cleanDir</span> (line <span class="line-number">275</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">清除缓存目录下面的文件</p>
	<ul class="tags">
				<li><span class="field">throws:</span> ThinkExecption</li>
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			cleanDir
		</span>
					([<span class="var-type">string</span>&nbsp;<span class="var-name">$cacheDir</span> = <span class="var-default">CACHE_PATH</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$cacheDir</span><span class="var-description">: 缓存目录名</span>			</li>
				</ul>
		
			
	</div>
<a name="methodcompiler" id="compiler"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">compiler</span> (line <span class="line-number">172</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">编译模板文件内容</p>
<p class="description"><p>包括模板解析、同步路径和编码转换</p></p>
	<ul class="tags">
				<li><span class="field">throws:</span> ThinkExecption</li>
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			compiler
		</span>
					(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$tmplContent</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$charset</span> = <span class="var-default">''</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$tmplContent</span><span class="var-description">: 模板内容</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$charset</span><span class="var-description">: 模板输出字符集</span>			</li>
				</ul>
		
			
	</div>
<a name="methodget" id="get"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">get</span> (line <span class="line-number">53</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			get
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$name</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$name</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetIncludeTagLib" id="getIncludeTagLib"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getIncludeTagLib</span> (line <span class="line-number">395</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">搜索模板页面中包含的TagLib库</p>
<p class="description"><p>并返回列表</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string|false</span>
		<span class="method-name">
			getIncludeTagLib
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">&$content</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$content</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$content</span><span class="var-description">: 模板内容</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">&$content</span>			</li>
				</ul>
		
			
	</div>
<a name="methodload" id="load"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">load</span> (line <span class="line-number">66</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			load
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$templateFile</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$charset</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$templateVar</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$varPrefix</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$templateFile</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$charset</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$templateVar</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$varPrefix</span>			</li>
				</ul>
		
			
	</div>
<a name="methodloadTemplate" id="loadTemplate"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">loadTemplate</span> (line <span class="line-number">90</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">加载主模板并缓存</p>
	<ul class="tags">
				<li><span class="field">throws:</span> ThinkExecption</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			loadTemplate
		</span>
					([<span class="var-type">string</span>&nbsp;<span class="var-name">$tmplTemplateFile</span> = <span class="var-default">''</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$charset</span> = <span class="var-default">''</span>], <span class="var-type">string</span>&nbsp;<span class="var-name">$varPrefix</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$tmplTemplateFile</span><span class="var-description">: 模板文件</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$varPrefix</span><span class="var-description">: 模板变量前缀</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$charset</span><span class="var-description">: 模板输出字符集</span>			</li>
				</ul>
		
			
	</div>
<a name="methodparse" id="parse"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">parse</span> (line <span class="line-number">304</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">模板解析入口</p>
<p class="description"><p>支持普通标签和TagLib解析 支持自定义标签库</p></p>
	<ul class="tags">
				<li><span class="field">throws:</span> ThinkExecption</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			parse
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$content</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$content</span><span class="var-description">: 要解析的模板内容</span>			</li>
				</ul>
		
			
	</div>
<a name="methodparseInclude" id="parseInclude"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">parseInclude</span> (line <span class="line-number">748</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">加载公共模板并缓存 和当前模板在同一路径，否则使用相对路径</p>
	<ul class="tags">
				<li><span class="field">throws:</span> ThinkExecption</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			parseInclude
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$tmplPublicName</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$tmplPublicName</span><span class="var-description">: 公共模板文件名</span>			</li>
				</ul>
		
			
	</div>
<a name="methodparseLiteral" id="parseLiteral"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">parseLiteral</span> (line <span class="line-number">351</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">替换页面中的literal标签</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string|false</span>
		<span class="method-name">
			parseLiteral
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$content</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$content</span><span class="var-description">: 模板内容</span>			</li>
				</ul>
		
			
	</div>
<a name="methodparseTag" id="parseTag"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">parseTag</span> (line <span class="line-number">508</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">模板标签解析</p>
<p class="description"><p>格式： {TagName:args [|content] }</p></p>
	<ul class="tags">
				<li><span class="field">throws:</span> ThinkExecption</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			parseTag
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$tagStr</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$tagStr</span><span class="var-description">: 标签内容</span>			</li>
				</ul>
		
			
	</div>
<a name="methodparseTagLib" id="parseTagLib"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">parseTagLib</span> (line <span class="line-number">429</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">TagLib库解析</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			parseTagLib
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$tagLib</span>, <span class="var-type"></span>&nbsp;<span class="var-name">&$content</span>, [<span class="var-type">boolen</span>&nbsp;<span class="var-name">$hide</span> = <span class="var-default">false</span>], <span class="var-type">string</span>&nbsp;<span class="var-name">$content</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$tagLib</span><span class="var-description">: 要解析的标签库</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$content</span><span class="var-description">: 要解析的模板内容</span>			</li>
					<li>
				<span class="var-type">boolen</span>
				<span class="var-name">$hide</span><span class="var-description">: 是否隐藏标签库前缀</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">&$content</span>			</li>
				</ul>
		
			
	</div>
<a name="methodparseThinkVar" id="parseThinkVar"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">parseThinkVar</span> (line <span class="line-number">702</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">特殊模板变量解析</p>
<p class="description"><p>格式 以 $Think. 打头的变量属于特殊模板变量</p></p>
	<ul class="tags">
				<li><span class="field">throws:</span> ThinkExecption</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			parseThinkVar
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$varStr</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$varStr</span><span class="var-description">: 变量字符串</span>			</li>
				</ul>
		
			
	</div>
<a name="methodparseVar" id="parseVar"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">parseVar</span> (line <span class="line-number">587</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">模板变量解析,支持使用函数</p>
<p class="description"><p>格式： {$varname|function1|function2=arg1,arg2}</p></p>
	<ul class="tags">
				<li><span class="field">throws:</span> ThinkExecption</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			parseVar
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$varStr</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$varStr</span><span class="var-description">: 变量数据</span>			</li>
				</ul>
		
			
	</div>
<a name="methodparseVarFunction" id="parseVarFunction"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">parseVarFunction</span> (line <span class="line-number">663</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">对模板变量使用函数</p>
<p class="description"><p>格式 {$varname|function1|function2=arg1,arg2}</p></p>
	<ul class="tags">
				<li><span class="field">throws:</span> ThinkExecption</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			parseVarFunction
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$varArray</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$name</span><span class="var-description">: 变量名</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$varArray</span><span class="var-description">: 函数列表</span>			</li>
				</ul>
		
			
	</div>
<a name="methodparseXmlTag" id="parseXmlTag"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">parseXmlTag</span> (line <span class="line-number">479</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">解析标签库的标签</p>
<p class="description"><p>需要调用对应的标签库文件解析类</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string|false</span>
		<span class="method-name">
			parseXmlTag
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$tagLib</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$tag</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$attr</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$content</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$tagLib</span><span class="var-description">: 标签库名称</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$tag</span><span class="var-description">: 标签名</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$attr</span><span class="var-description">: 标签属性</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$content</span><span class="var-description">: 标签内容</span>			</li>
				</ul>
		
			
	</div>
<a name="methodrestoreLiteral" id="restoreLiteral"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">restoreLiteral</span> (line <span class="line-number">375</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">还原被替换的literal标签</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string|false</span>
		<span class="method-name">
			restoreLiteral
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$tag</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$tag</span><span class="var-description">: literal标签序号</span>			</li>
				</ul>
		
			
	</div>
<a name="methodset" id="set"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">set</span> (line <span class="line-number">61</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			set
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$name</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$value</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$name</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$value</span>			</li>
				</ul>
		
			
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Thu, 27 Mar 2008 08:20:58 +0000 by 塞北的雪
	</p>
	</div></body>
</html>